<?xml version="1.0" encoding="utf-8"?>
<rsp stat="<?php echo $stat ?>">
<?php if($stat == 'ok'): ?>
  <books page="<?php echo $page ?>" perpage="<?php echo $perpage ?>" pages="<?php echo $pages ?>" total="<?php echo $total ?>" search_term="<?php echo $search_term ?>">
<?php include_partial('list', array('books' => $books)); ?>
  </books>
<?php else: ?>
  <err code="<?php echo $error_code ?>" msg="<?php echo $error_msg ?>" />
<?php endif; ?>
</rsp>